home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / upc12bs1.zip / UUCICO / fossil.c < prev    next >
C/C++ Source or Header  |  1993-05-30  |  3KB  |  74 lines

  1. /*--------------------------------------------------------------------*/
  2. /*       f o s s i l . c                                              */
  3. /*                                                                    */
  4. /*       UUPC/extended defines for accessing FOSSIL functions via     */
  5. /*       INT 14 under MS-DOS; also used for other INT14 interfaces.   */
  6. /*--------------------------------------------------------------------*/
  7.  
  8. /*--------------------------------------------------------------------*/
  9. /*    Changes Copyright (c) 1990-1993 by Kendra Electronic            */
  10. /*    Wonderworks.                                                    */
  11. /*                                                                    */
  12. /*    All rights reserved except those explicitly granted by the      */
  13. /*    UUPC/extended license agreement.                                */
  14. /*--------------------------------------------------------------------*/
  15.  
  16. /*--------------------------------------------------------------------*/
  17. /*                          RCS Information                           */
  18. /*--------------------------------------------------------------------*/
  19.  
  20. /*
  21.  *    $Id: FOSSIL.C 1.1 1993/05/30 15:25:50 ahd Exp $
  22.  *
  23.  *    Revision history:
  24.  *    $Log: FOSSIL.C $
  25.  * Revision 1.1  1993/05/30  15:25:50  ahd
  26.  * Initial revision
  27.  *
  28.  * Revision 1.1  1993/05/30  00:16:35  ahd
  29.  * Initial revision
  30.  *
  31.  */
  32.  
  33.  
  34. /*--------------------------------------------------------------------*/
  35. /*                        System include files                        */
  36. /*--------------------------------------------------------------------*/
  37.  
  38. #include <stdio.h>
  39. #include <dos.h>
  40.  
  41. /*--------------------------------------------------------------------*/
  42. /*                    UUPC/extended include files                     */
  43. /*--------------------------------------------------------------------*/
  44.  
  45. #include "lib.h"
  46. #include "fossil.h"
  47.  
  48. /*--------------------------------------------------------------------*/
  49. /*                          Global variables                          */
  50. /*--------------------------------------------------------------------*/
  51.  
  52. short portNum;        // Must be set by openline()
  53.  
  54. /*--------------------------------------------------------------------*/
  55. /*       F o s s i l C n t l                                          */
  56. /*                                                                    */
  57. /*       Perform control functions on a FOSSIL port                   */
  58. /*--------------------------------------------------------------------*/
  59.  
  60.  short FossilCntl( const char function, const char info )
  61.  {
  62.    union REGS regs;
  63.  
  64.    regs.x.dx = portNum;
  65.    regs.h.ah = function;
  66.    regs.h.al = info;
  67.    regs.x.bx = 0x00;          // Insure start function doesn't
  68.                               // cause ES:CX to be twiddled
  69.    int86( FS_INTERRUPT, ®s, ®s );
  70.  
  71.    return regs.x.ax;          // Return AX to caller
  72.  
  73.  } /* FossilCntl */
  74.